<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="ie=edge" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Document</title>
    </head>
    <body>
        <div id="app">
            <div>{{msg}}</div>
        </div>
        <script src="../vue.js"></script>
        <script>
            let vm = new Vue({
                el: '#app',
                data() {
                    return {
                        msg: '',
                    };
                },
                methods: {},
                beforeCreate() {
                    console.group('beforeCreate');
                    console.log(this.$el);
                    console.log({
                        el: this.$el,
                        msg: this.msg,
                    });
                },
                created() {
                    console.group('created');
                    console.log(this.$el);
                    console.log({
                        el: this.$el,
                        msg: this.msg,
                    });
                    // this.msg = 'hello';
                },
                beforeMount() {
                    console.group('beforeMount');
                    console.log(this.$el);
                    console.log({
                        el: this.$el,
                        msg: this.msg,
                    });
                },
                mounted() {
                    console.group('mounted');
                    console.log(this.$el);
                    console.log({
                        el: this.$el,
                        msg: this.msg,
                    });
                    this.msg = 'hello';
                },
                beforeUpdate() {
                    console.group('beforeUpdate');
                    console.log({
                        el: this.$el,
                        msg: this.msg,
                    });
                },
                updated() {
                    console.group('updated');
                    console.log({
                        el: this.$el,
                        msg: this.msg,
                    });
                },
                beforeDestroy() {
                    console.group('beforeDestroy');
                    console.log({
                        el: this.$el,
                        msg: this.msg,
                    });
                },
                destroyed() {
                    console.group('destroyed');
                    console.log({
                        el: this.$el,
                        msg: this.msg,
                    });
                },
            });
        </script>
    </body>
</html>
